﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using ArtClub.Model;

namespace ArtClub.DAL
{
    interface IAuctionDB
    {
		/// <summary>
		/// Creates an auction.
		/// </summary>
		/// <param name="auction">Auction to create.</param>
        void Create(Auction auction);

		/// <summary>
		/// Gets an auction by id.
		/// </summary>
		/// <param name="id">The auction's id.</param>
		/// <returns></returns>
        Auction GetAuction(int id);

		/// <summary>
		/// Gets all auctions.
		/// </summary>
		/// <returns>A list containing all auctions.</returns>
        List<Auction> ListAuctions();

		/// <summary>
		/// Gets all auctions by their status (sold or not sold).
		/// </summary>
		/// <param name="isSold">Whether the auction is sold.</param>
		/// <returns>A list containing all the auctions that are either sold or not sold.</returns>
        List<Auction> ListAuctionsBySold(bool isSold);

		/// <summary>
		/// Adds a bid to an auction.
		/// </summary>
		/// <param name="auction">The auction that is bidded on.</param>
		/// <param name="bid">The bid.</param>
        void Update(Auction auction, Bid bid);

		/// <summary>
		/// Closes an auction.
		/// </summary>
		/// <param name="auction">The auction to close.</param>
        void Close(Auction auction);
    }
}
